<template>
    <div>
        <van-tag plain v-if="!this.checked" @click="this.toggleChecked" size="large">{{this.tagTitle}}</van-tag>
        <van-tag plain type="danger" size="large" v-else @click="this.toggleChecked">{{this.tagTitle}}</van-tag>
    </div>
</template>

<script>
    import {Tag} from 'vant'
    export default {
        name: "TagSwitch",
        props: {
            tagTitle: String,
            checked: Boolean,
            toggleChecked:Function
        },
        components:{
            "van-tag": Tag,
        }
    }
</script>

<style scoped>

</style>
